<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="X-admin/lib/layui/css/layui.css">
    <script src="X-admin/js/jquery.js"></script>
    <script src="X-admin/lib/layui/layui.js"></script>
    <script src="X-admin/lib/layui/lay/modules/laydate.js"></script>

    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>

<blockquote class="layui-elem-quote">

    <div class="layui-form">
        <div class="layui-form-item">

            <div class="layui-inline">
                <label class="layui-form-label">可预订最近三天</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" id="test-limit2" placeholder="最近三天">
                </div>
            </div>
        </div>
    </div>


</blockquote>


<!--//js部分-->
<script>

    <!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->


    layui.use('laydate', function () {
        var laydate = layui.laydate;

        //前后若干天可选，这里以3天为例
        laydate.render({
            elem: '#test-limit2'
            , min: 0
            , max: 3
            // ,value:'2021-07-22'
            // ,
        });
        // $('.laydate-theme-grid table tbody').find('[lay-ymd="' +  + '"]').removeClass('layui-this');
        $('.laydate-theme-grid table tbody').find('[lay-ymd="' + '2021-07-22' + '"]').addClass('laydate-disabled');
        $("#table>tbody>tr").find('[lay-ymd="' + 22 + '"]').addClass('laydate-disabled');
    })


</script>

</body>
</html>